package com.aruba.databingviewmodellivedata;

import androidx.lifecycle.MutableLiveData;

/**
 * Created by aruba on 2021/9/11.
 */
public class Idol {
    private MutableLiveData<String> name;
    private MutableLiveData<Integer> star;
    private MutableLiveData<String> imageUrl;
    private MutableLiveData<Integer> score;

    public Idol(String name, int star, String imageUrl,int score) {
        this.name = new MutableLiveData<>();
        this.name.setValue(name);
        this.star = new MutableLiveData<>();
        this.star.setValue(star);
        this.imageUrl = new MutableLiveData<>();
        this.imageUrl.setValue(imageUrl);
        this.score = new MutableLiveData<>();
        this.score.setValue(score);
    }

    public MutableLiveData<String> getName() {
        return name;
    }

    public MutableLiveData<Integer> getStar() {
        return star;
    }

    public MutableLiveData<String> getImageUrl() {
        return imageUrl;
    }

    public void setName(String name) {
        this.name.setValue(name);
    }

    public void setStar(Integer star) {
        this.star.setValue(star);
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl.setValue(imageUrl);
    }

    public MutableLiveData<Integer> getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score.setValue(score);
    }
}
